home *** CD-ROM | disk | FTP | other *** search
/ Champak 119 / (Vol 119) Nov 09 2010.iso / TGKI-109 / Games / agent_platformer.swf / scripts / DefineSprite_158 / frame_1 / DoAction.as
Text File  |  2010-11-09  |  451b  |  29 lines

  1. max = 1;
  2. timer = 0;
  3. timer2 = 0;
  4. limit = 100;
  5. slide.onEnterFrame = function()
  6. {
  7.    timer++;
  8.    if(timer >= limit)
  9.    {
  10.       timer2++;
  11.       effect.play();
  12.       if(timer2 == 40)
  13.       {
  14.          max++;
  15.          timer = 0;
  16.          timer2 = 0;
  17.          if(max <= 4)
  18.          {
  19.             this.nextFrame();
  20.          }
  21.          else
  22.          {
  23.             max = 0;
  24.             this.gotoAndStop(1);
  25.          }
  26.       }
  27.    }
  28. };
  29.